POV-Ray : Newsgroups : povray.newusers : wrapping textures around an object : Re: wrapping textures around an object Server Time
2 Nov 2024 11:24:25 EDT (-0400)
  Re: wrapping textures around an object  
From: JC (Exether)
Date: 12 Apr 2004 03:58:30
Message: <407a4c26$1@news.povray.org>
Tim wrote:

> whenever i use image_map to map a texture onto a box of any size, only the
> front and back is textured leaving the top and sides all wierd and stretched
> looking ... (the texture bricks is just declared becasue i use it often in
> my scene)
> 
> #declare bricks = texture {
>  pigment {
>   image_map {
>    "stone.bmp"
>       map_type 0
>       interpolate 2
>   }
>   scale 10
>  }
> }
> 
> box {
>  <-20, -10, 5>, <20, 2.7, 10>
>  texture { bricks }
> }
> 
> .. i just want the brick texture to show up everywhere on the box.
> help appreciated

POV textures are 3D textures, which means they have a value in every 
point of space.
Quote from POV documentation:
" By default, the image is mapped onto the x-y-plane. The image is 
projected onto the object as though there were a slide projector 
somewhere in the -z-direction. The image exactly fills the square area 
from (x,y) coordinates (0,0) to (1,1) regardless of the image's original 
size in pixels."

So when you create a texture with an image map, it can be seen only on 
planes in the (x,y) direction, on other planes the streched parts you 
see are the borders of the image.

If you want to use your texture on the box, you will have to create 
separately the 6 faces and assigning the texture to them with proper 
rotations.

I hope that helps,

JC

-- 
http://exether.free.fr/irtc (more IRTC stats !)


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.